package com.you.member.dal.dao;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.you.member.dal.dao.dataobject.AccountBindDO;

public class AccountBindDAO extends SqlMapClientDaoSupport {

    public AccountBindDO find(String fid, String type) {
        AccountBindDO accountBindDO = new AccountBindDO();
        if (type.equals("douban")) {
            accountBindDO.setDoubanId(fid);
        }
        return (AccountBindDO) super.getSqlMapClientTemplate().queryForObject("MS-SELECT-ACCOUNT-BIND", accountBindDO);
    }
    
    public AccountBindDO create(AccountBindDO  accountBindDO) {
        return (AccountBindDO) super.getSqlMapClientTemplate().insert("MS-CREATE-ACCOUNT-BIND",accountBindDO);
    }
    
    
}
